<template>
    <div :style="style" class="headerWid" >
        <slot></slot>
    </div>
</template>

<script setup lang="ts" >

import {computed} from 'vue'
    import type {CSSProperties} from "vue"
    // function defineOptions(tags0:{name:string}){
    //     throw new Error('Function not implemented.');
    // }
    //定义主件的名字
    defineOptions({
        name:"ElHeader"
    })

    let props = defineProps({
        height:{
            type:Number,
            default:60
        }
    })

    const style = computed(()=>{
        const styles:CSSProperties = {}
        if(props.height){
            styles.height = props.height+'px'
        }

        return styles
        
    })

</script>

<style scoped lang="scss">
    // .header{
    //     padding: 0 20px;
    // }
    .headerWid{
        width: 100%;
    }

</style>